import Vue from 'vue'
import VueRouter from 'vue-router'
import Phome from '../views/P_home.vue'
import Pzhanghu from '../views/P_zhanghu.vue'
import Ppersonaldata from '../views/P_personaldata.vue'
import Pchongzhiduihuan from '../views/P_chongzhiduihuan.vue'
import Pchongzhiyoulei from '../views/P_chongzhiyoulei.vue'
import Pwodezhangdan from '../views/P_wodezhangdan.vue'
import Porder from '../views/P_order.vue'
import Porderdetail from '../views/P_orderdetail.vue'
import Porderpingjia from '../views/P_orderpingjia.vue'
import Pintegral from '../views/P_integral.vue'
import Pintorder from '../views/P_intorder.vue'
import Pintdetail from '../views/P_intdetail.vue'
import Pmoney from '../views/P_money.vue'
import Pmaterial from '../views/P_material.vue'
import Pchangephon1 from '../views/P_changephon1.vue'
import Pchangephon2 from '../views/P_changephon2.vue'
import Pchangephon3 from '../views/P_changephon3.vue'
import Paddmanage from '../views/P_addmanage.vue'
import Paddempty from '../views/P_addempty.vue'
import Paddnew from '../views/P_addnew.vue'
import Pcollect from '../views/P_collect.vue'
import Precentbrowing from '../views/P_recentbrowing.vue'
import Pchangemima from '../views/P_changemima.vue'
import Pnews from '../views/P_news.vue'
import Pnewsdetail from '../views/P_newsdetail.vue'
import Pfeedback from '../views/P_feedback.vue'

import '../assets/font-awesome-4.7.0/css/font-awesome.min.css';
// import Home from '../views/Home.vue'
import NameLogin from '../views/BX-login.vue';
import Index from '../views/BX-index.vue';
import Same from '../views/BX-sameCity.vue';
import Samecontent from '../views/BX-samecitycontent.vue';
import Friday from '../views/BX-friday.vue';
import FridayContent from '../views/BX-fridaycontent.vue';
import Shop from '../views/BX-ShopCar.vue';
import Cartable from "../views/CarTable.vue";
import Order from "../views/BX-orderInfo.vue";
import Pay from "../views/BX-Payment.vue";
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    component: Index,
  },
  {
    path: '/home',
    name: 'home',
    component: Phome,
    children:[
      {
        path:"/",
        component: Pzhanghu,
      },
      {
        path:'P_zhanghu',
        name:'zhanghu',
        component:Pzhanghu,
        children:[
          {path: 'P_personaldata', component: Ppersonaldata},
          {path: 'P_chongzhiduihuan', component: Pchongzhiduihuan},
          {path: 'P_chongzhiyoulei', component: Pchongzhiyoulei},
          {path: 'P_wodezhangdan', component: Pwodezhangdan},
        ]
        },
      {
        path:'P_order',
        name:'order', 
        component:Porder,
        children:[
          {path: 'P_orderdetail', component: Porderdetail},
          {path: 'P_orderpingjia', component: Porderpingjia},
        ]
      },
      {
        path:'P_integral',
        name:'integral',
        component:Pintegral},
      { 
        path:'P_intorder',
        name:'intorder',
        component:Pintorder,
        children:[
          {path: 'P_intdetail', component: Pintdetail},
        ]},
      {
        path:'P_money',
        name:'money',
        component:Pmoney},
      { 
        path:'P_material',
        name:'material',
        component:Pmaterial,
        children:[
          {path: 'P_changephon1', component: Pchangephon1},
          {path: 'P_changephon2', component: Pchangephon2},
          {path: 'P_changephon3', component: Pchangephon3},
        ]
      },
      { 
        path:'P_addmanage',
        name:'addmanage',
        component:Paddmanage,
        children:[
          {path: 'P_addempty', component: Paddempty},
          {path: 'P_addnew', component: Paddnew},
        ]
      },
      { 
        path:'P_collect',
        name:'collect',
        component:Pcollect},
      {
        path:'P_recentbrowing',
        name:'recentbrowing',
        component:Precentbrowing},
      {
        path:'P_changemima',
        name:'changemima',
        component:Pchangemima},
      {
        path:'P_news',
        name:'news',
        component:Pnews,
        children:[
          {path: 'P_newsdetail', component: Pnewsdetail},
        ]
      },
      {
        path:'P_feedback',
        name:'feedback',
        component:Pfeedback},
    ]
  },
  
  {
    path: '/login',
    component: NameLogin
  },
  {
    path: '/index',
    component: Index
  },
  // 同城
  {
    path: '/same',
    component: Same,children:[
      {
        path: '/',
        component: Samecontent,
      },
      {
      path: 'samecontent',
      component: Samecontent,
    },

  ]
  },
  // 关于礼拜五
  {
    path: '/friday',
    component: Friday,
    children:[
      {
        path: '/',
        component: FridayContent,
      },
      {
      path: 'fridayContent',
      component: FridayContent,
    },
    ]
  },
  // 购物车
  {
    path: '/shop',
    component:Shop,children:[
      {path:'/',component:Cartable},
      {path:'cartable',component:Cartable},
      {path:'order',component:Order},
      {path:'pay',component:Pay},

    ]
    
  }
]

const router = new VueRouter({
  routes
})

export default router
